package chapter23.homework03;

public class Player {
    private String name;
    private State state;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public State getState() {
        return state;
    }

    public void setState(State state) {
        this.state = state;
    }

    public Player(String name){
        this.name = name;
        this.state = new Primary(this);
        //传入玩家的初始状态
    }

    public void LeavingMessage(){
        state.LeavingMessage();
    }

    public void reply(){
        state.reply();
    }

    public void  download(){
        state.download();
    }

}
